<script>
import { getNovelDetail, getChapterList, getContentForAuthor } from "@/api/bookshelf/bookshelf";

export default {
  name: "NovelDetail",
  data() {
    return {
      // ... 其他数据属性 ...
    };
  },
  methods: {
    getChapterContent() {
      console.log('调用getChapterContent方法:', { title: this.novelName, orderNum: this.$route.query.orderNum });
      getContentForAuthor(this.novelName, this.$route.query.orderNum)
        .then(response => {
          console.log('获取章节内容成功:', response);
          if (response.code === 200) {
            this.chapterInfo = response.data;
            // 检查是否有上一章和下一章
            this.checkChapterNavigation();
          }
        })
        .catch(error => {
          console.error('获取章节内容失败:', error);
          this.$message.error("获取章节内容失败");
        });
    },
    // ... 其他方法 ...
  }
}
</script> 